#pragma once
#include"BRTree.h"

namespace xhy
{
	template<class K>
	struct SetOfT
	{
		const K& operator()(const K& key) { return key; }
	};

	template<class K>
	class set
	{
		typedef BRTree<K, const K, SetOfT<K>> BRTree;
	public:
		typedef typename BRTree::Iterator iterator;
		typedef typename BRTree::Const_Iterator const_iterator;
	public:
		pair<iterator, bool> insert(const K& key) { return _t.Insert(key); }

		iterator begin() { return _t.Begin(); }
		const_iterator begin() const { return _t.Begin(); }
		iterator end() { return _t.End(); }
		const_iterator end() const { return _t.End(); }

	private:
		BRTree _t;
	};
}